{% extends "base.html" %}
{% block content %}
<section class="search">
  <img src="/static/indieweb.png" alt="IndieWeb logo" />
  <h1>IndieWeb Search</h1>
  {% if query == 'site:"jamesg.blog"' %}
    <p>Use the form below to find a web page on {{ query.replace("site:", "").replace('"', "") }}.</p>
  {% else %}
    <p>Use the form below to find a web page made by someone in the IndieWeb community.</p>
  {% endif %}
  <form action="/results" method="GET" role="search">
    <input type="text" id="query" name="query" placeholder="Enter your query" aria-label="Search" />
    {% if query == 'site:"jamesg.blog"' %}
      <input type="hidden" name="site" value="{{ query.replace("site:", "").replace('"', "") }}" />
    {% endif %}
    <br>
    <input type="submit" value="Search">
  </form>
  <p class="advanced-p">View <a href="/advanced">advanced search options</a>.</p>
</section>
{% endblock %}